#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>

int main(int argc, const char *argv[])
{
	FILE *fp = fopen("/tmp/test.log", "wb+");
	while(1) {
	char *p = getenv("FACE_UPLOAD_ENDPOINT");
	if(p) {
		printf("env val = %s\n",p);
		fprintf(fp,"env val = %s\n",p);
	} else {
		printf("env not found!\n");
		fprintf(fp, "env not found!\n");
	}
	fflush(fp);
	fflush(stdin);
	sleep(5);
	}
	fclose(fp);
	exit(0);
}

